Skip to content

make the benchmark workflow build the PR and run again - #3948

Merged
utam0k merged 1 commit into
youki-dev:mainfrom
utam0k:ci-bench
Nov 29, 2026
Merged

utam0k merged 1 commit into
youki-dev:mainfrom
utam0k:ci-bench

Conversation

@utam0k

@utam0k utam0k commented Nov 28, 2026

Copy link
Copy Markdown
Member

Description

The benchmark workflow has failed since #2012 removed .github/scripts/dependency.sh. It also never built the PR, because actions/checkout checks out main on issue_comment. This fixes both and compares the PR with its merge base.

  • Start with a /benchmark comment from an owner, member, or collaborator.
  • Give the jobs that run PR code a read-only token. Only the job that posts the result can write.
  • Time youki with a warm cache and without sudo in the timed command. The old setup mostly timed sudo starting from a cold cache.
  • Send hyperfine output to a pipe to avoid fix(libcontainer): open /dev/null read-write in reopen_dev_null #3947.
  • Post the result as a PR comment.

Type of Change

  • Bug fix (non-breaking change that fixes an issue)
  • CI/CD related changes

Testing

  • Tested manually

An issue_comment workflow runs from the default branch, so I tested this on my fork with a PR that changes no code.

  • /benchmark posted the result (run).
  • Other comments, including !github easy-benchmark, were skipped.
  • A failed run posted a link to itself (run).

The two builds differed by up to 3%, so the report says to treat smaller changes as noise.

Additional Context

AI-assisted.

Signed-off-by: utam0k <k0ma@utam0k.jp>
@utam0k
utam0k requested review from a team and a balanced review from Copilot November 28, 2026 23:42

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔵 Needs a closer look

Human security review is needed because the issue_comment workflow runs PR-supplied code as root, and the successful same-repository test does not establish runtime/cache isolation or fork-PR safety.

No open issues 🎉

What changed in this PR

Repairs the execution-time benchmark workflow so it builds the requested PR and compares it with its merge base, replacing the broken dependency setup and default-branch checkout.

Changes:

  • Restricts /benchmark triggers to owners, members, and collaborators, and limits write permissions to the reporting job.
  • Builds both revisions and benchmarks with warm caches, piped output, and no sudo inside the timed commands.
  • Posts benchmark results or a failure link to the PR.
File Description
.github/​workflows/​benchmark_execution_time.yml Reworks revision resolution, builds, benchmarking, permissions, and PR reporting.

Review effort: Balanced

@saku3 saku3 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks.

@utam0k
utam0k merged commit 8d8e409 into youki-dev:main Nov 29, 2026
36 checks passed
@youki-dev-bot youki-dev-bot Bot mentioned this pull request Nov 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants